/*
 * To change this template, chopromotione Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.PromotionDao;
import com.techshop.model.Promotion;
import com.techshop.service.PromotionService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class PromotionServiceImpl implements PromotionService
{    
    private PromotionDao promotionDao;    

    @Override
    public Promotion getById(int promotionID)
    {
        return this.getPromotionDao().getById(promotionID);
    }

    @Override
    public boolean insert(Promotion promotion)
    {
        return this.getPromotionDao().insert(promotion);
    }

    @Override
    public boolean update(Promotion promotion)
    {
        return this.getPromotionDao().update(promotion);
    }

    @Override
    public boolean delete(Promotion promotion)
    {
        return this.getPromotionDao().delete(promotion);
    }

    /**
     * @return the promotionDao
     */
    public PromotionDao getPromotionDao()
    {
        return promotionDao;
    }

    /**
     * @param promotionDao the promotionDao to set
     */
    public void setPromotionDao(PromotionDao promotionDao)
    {
        this.promotionDao = promotionDao;
    }

    @Override
    public List<Promotion> getAll()
    {
        return promotionDao.getAll();
    }
}